<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Auth::routes(['verify' => true]);

//Route::get('/', 'PageController@root')->name('root');
Route::get('/', 'TopicController@index')->name('root');

Route::resource('users', 'UserController', ['only' => ['show', 'update', 'edit']]);
Route::resource('topics', 'TopicController', ['only' => ['index', 'create', 'store', 'update', 'edit', 'destroy']]);
Route::get('topics/{topic}/{slug?}', 'TopicController@show')->name('topics.show');
Route::resource('categories', 'CategoryController', ['only' => ['show']]);
Route::post('upload_image', 'TopicController@uploadImage')->name('topics.upload_image');
Route::resource('replies', 'ReplyController', ['only' => ['store', 'destroy']]);
Route::resource('notifications', 'NotificationsController', ['only' => ['index']]);